﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Registration.aspx.cs" Inherits="AteckCsharp.Account.Registration" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" 
        BackColor="#FFFBD6" BorderColor="#FFDFAD" BorderStyle="Solid" BorderWidth="1px" 
        CssClass="centeritForLogin"  Font-Size="0.8em" 
        LoginCreatedUser="False" DisableCreatedUser="True" 
        OnCreatedUser ="CreateUserWizard1_CreatedUser">
        <SideBarStyle BackColor="#990000" Font-Size="0.9em" 
            VerticalAlign="Top" />
        <SideBarButtonStyle 
            ForeColor="#FFFFFF" />
        <ContinueButtonStyle BackColor="White" BorderColor="#CC9966" 
            BorderStyle="Solid" BorderWidth="1px" 
            ForeColor="#990000"/>
        <NavigationButtonStyle BackColor="White" BorderColor="#CC9966" 
            BorderStyle="Solid" BorderWidth="1px" 
            ForeColor="#990000" />
        <HeaderStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#333333" 
            HorizontalAlign="Center" BorderColor="#FFFBD6" BorderStyle="Solid" 
            BorderWidth="2px" Font-Size="0.9em" />
        <CreateUserButtonStyle BackColor="White" BorderColor="#CC9966" 
            BorderStyle="Solid" BorderWidth="1px"  
            ForeColor="#990000" />
        <TitleTextStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFFF" />
        <StartNavigationTemplate>
            <asp:Button ID="StartNextButton" runat="server" BackColor="#FFFBFF" 
                BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" 
                CommandName="MoveNext"  ForeColor="#284775" Text="Next" />
        </StartNavigationTemplate>
        <WizardSteps>
            <asp:WizardStep ID="CreateUserWizardStep0" runat = "server">
                <asp:SqlDataSource ID="CreateUserProfile" runat="server" ConnectionString="<%$ ConnectionStrings:Fadi %>"
    InsertCommand="INSERT INTO [UsersProfile] ([UserId],[FirstName], [LastName], [Street], [City], [State], [Zip], [DOB], [PhoneNo]) VALUES (@UserId,@firstName, @lastName, @street, @city, @state, @zip, @dob, @phoneNo)"
    ProviderName="<%$ ConnectionStrings:Fadi.ProviderName %>">
    <InsertParameters>
    <asp:ControlParameter Name="FirstName" Type="String" ControlID="txtFirstName" PropertyName="Text" />
        <asp:ControlParameter Name="LastName" Type="String" ControlID="txtLastName" PropertyName="Text" />
        <asp:ControlParameter Name="Street" Type="String" ControlID="txtStreet" PropertyName="Text" />
        <asp:ControlParameter Name="City" Type="String" ControlID="txtCity" PropertyName="Text" />
        <asp:ControlParameter Name="State" Type="String" ControlID="txtState" PropertyName="Text" />
        <asp:ControlParameter Name="Zip" Type="String" ControlID="txtZip" PropertyName="Text" />
        <asp:ControlParameter Name="DOB" Type="String" ControlID="txtDob" PropertyName="Text" />
        <asp:ControlParameter Name="PhoneNo" Type="String" ControlID="txtPhoneNo" PropertyName="Text" />

    </InsertParameters>
</asp:SqlDataSource>
                
                <table>
                     <tr>
                            <td align="right">
                                First Name:</td>
                            <td>
                                <asp:TextBox ID="txtFirstName" runat="server" CssClass="txtBox" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ControlToValidate="txtFirstName" ErrorMessage="First Name is required." 
                                    ToolTip="First Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                         <tr>
                            <td align="right">
                                Last Name:</td>
                            <td>
                                <asp:TextBox ID="txtLastName" runat="server" CssClass="txtBox" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="txtLastName" ErrorMessage="Last Name is required." 
                                    ToolTip="Last Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                         <tr>
                            <td align="right">
                                DOB:</td>
                            <td>
                                <asp:TextBox ID="txtDob" runat="server" CssClass="txtBox" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                    ControlToValidate="txtDob" ErrorMessage="Date of Birth is required." 
                                    ToolTip="Date of Birth is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                Phone No:</td>
                            <td>
                                <asp:TextBox ID="txtPhoneNo" runat="server" CssClass="txtBox" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                                    ControlToValidate="txtPhoneNo" ErrorMessage="txtPhoneNo is required." 
                                    ToolTip="txtPhoneNo is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                    <tr>
                        <td>
                            Street:
                        </td>
                        <td>
                            <asp:TextBox ID="txtStreet" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                    ControlToValidate="txtStreet" ErrorMessage="Street is required." 
                                    ToolTip="Street is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            City:
                        </td>
                        <td>
                            <asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                    ControlToValidate="txtCity" ErrorMessage="City is required." 
                                    ToolTip="City is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            State:
                        </td>
                        <td>
                            <asp:TextBox ID="txtState" runat="server"></asp:TextBox>
                             <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                    ControlToValidate="txtState" ErrorMessage="State is required." 
                                    ToolTip="State is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Zip:
                        </td>
                        <td>
                            <asp:TextBox ID="txtZip" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                    ControlToValidate="txtZip" ErrorMessage="Zip is required." 
                                    ToolTip="Zip is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                <ContentTemplate>
                    <table border="0" >
                        <tr>
                            <td align="center" colspan="2" 
                                style="color:White;background-color:#6B696B;font-weight:bold;">
                               <h3>Sign Up for Your New Account</h3></td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" 
                                    Font-Size="Small">User Name:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="UserName" runat="server" CssClass="txtBox" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" 
                                    ControlToValidate="UserName" ErrorMessage="User Name is required." 
                                    ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" 
                                    Font-Size="Small">Password:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="Password" runat="server" TextMode="Password" CssClass="txtBox" 
                                    Height="23px" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" 
                                    ControlToValidate="Password" ErrorMessage="Password is required." 
                                    ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="ConfirmPasswordLabel" runat="server" 
                                    AssociatedControlID="ConfirmPassword" Font-Size="Small">Confirm Password:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" 
                                    CssClass="txtBox" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" 
                                    ControlToValidate="ConfirmPassword" 
                                    ErrorMessage="Confirm Password is required." 
                                    ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" 
                                    Font-Size="Small">E-mail:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="Email" runat="server" CssClass="txtBox" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" 
                                    ControlToValidate="Email" ErrorMessage="E-mail is required." 
                                    ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                       
                        <tr>
                            <td align="right">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2">
                                <asp:CompareValidator ID="PasswordCompare" runat="server" 
                                    ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                    Display="Dynamic" 
                                    ErrorMessage="The Password and Confirmation Password must match." 
                                    ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2" style="color:Red;">
                                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
                <CustomNavigationTemplate>
                    <table border="0" cellspacing="5" style="width:100%;height:100%;">
                        <tr align="right">
                            <td align="right" colspan="0">
                                <asp:Button ID="StepNextButton" runat="server" BackColor="#FFFBFF" 
                                    BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" 
                                    CommandName="MoveNext" Font-Names="Verdana" ForeColor="#284775" 
                                    Text="Create User" ValidationGroup="CreateUserWizard1" CssClass="button" />
                            </td>
                        </tr>
                    </table>
                </CustomNavigationTemplate>
            </asp:CreateUserWizardStep>
            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                <ContentTemplate>
                    <table border="0" style="font-family:Verdana;font-size:100%;">
                        <tr>
                            <td align="center" colspan="2" 
                                style="color:White;background-color:#6B696B;font-weight:bold;">
                                Complete</td>
                        </tr>
                        <tr>
                            <td>
                                Your account has been successfully created.</td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2">
                                <asp:Button ID="ContinueButton" runat="server" BackColor="#FFFBFF" 
                                    BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" 
                                    CausesValidation="False" Font-Names="Verdana" 
                                    ForeColor="#284775" Text="Continue" 
                                    onclick="ContinueButton_Click" PostBackUrl="~/Account/ManageUsers.aspx" 
                                    CssClass="button" />
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:CompleteWizardStep>
        </WizardSteps>
    </asp:CreateUserWizard>

</asp:Content>
